home *** CD-ROM | disk | FTP | other *** search
/ Aminet 15 / Aminet 15 - Nov 1996.iso / Aminet / dev / basic / ace24dist.lha / ace24.lha / utils / Convert2ACE / Convert2Ace.readme < prev   
Text File  |  1996-09-10  |  3KB  |  107 lines

  1.  
  2.  
  3.         Convert2Ace.
  4.  
  5.         Convert2Ace is a simple utility to convert C-headers to
  6.         ACE Basic headers. To be able to use it you must have
  7.         OS 2.04+. It also uses the xen.font so if you don't have
  8.         it just install the font. It should be in this arcive.
  9.         I could have made Convert2Ace standalone without a library
  10.         but there can be more utility (maybe) written in CanDo so
  11.         I decide to distribute it with the cando.library. Put that
  12.         in libs.
  13.  
  14.         CHANGED. Made Convert2ACE standalone, you don't need
  15.         cando.library anymore.
  16.  
  17.         Use this utility at your own risk.
  18.  
  19.         Here is some guidelines on how to use Convert2Ace.
  20.  
  21.  
  22.         Before you let Convert2Ace do its job you have to browse
  23.         through the C-headers and correct (perhaps) some things.
  24.  
  25.         What you shall look for is:
  26.  
  27.         typedef struct {
  28.         .....
  29.         .....
  30.         }structname
  31.  
  32.         You have to convert that to a regular struct.
  33.  
  34.         struct structname {
  35.         ....
  36.         .....
  37.         }        
  38.  
  39.         Structs in structs, you have to lift the struct out
  40.         and put it as a stand alone struct. So is enum in a
  41.         struct, just convert it to a regular struct.
  42.  
  43.         Struct members have to be on the same line eg.
  44.         LONG     member,
  45.                  member1,
  46.                  member2;
  47.  
  48.         This won't work you have to put those on the same line
  49.         LONG     member,member1,member2;
  50.  
  51.         OR
  52.  
  53.         LONG     member;
  54.         LONG     member1;
  55.         LONG     member2;<--- don't forget the semicolon
  56.  
  57.         When a struct pointer is defined like this
  58.         struct Window   *   NextWindow;
  59.         change to
  60.         struct Window      *NextWindow;
  61.  
  62.         If there is something like this in the header
  63.         (11 << 4L) change to  (11<<4L)
  64.         just remove the spaces.
  65.  
  66.         If there is long defines in the header eg.
  67.         0x6454466L change it to 0x6454466&
  68.  
  69.         REMARK.  If there is xxxx|ooroor in the header just
  70.         put in spaces around |.   xxxx | ooroor. It will
  71.         be changed to OR by Convert2ACE.
  72.  
  73.  
  74.         Now to the code Conver2Ace produce.
  75.  
  76.         After Convert2Ace is done browse the header for things
  77.         like this.
  78.  
  79.         >>>>STRING ..... SIZE ..*.....
  80.         That's an array of structs, you have to recalculate the value.
  81.  
  82.         You will also see STRING ...... SIZE ...*SIZEOF(LONGINT)
  83.                                                 *SIZEOF(SHORTINT)
  84.                                                 *SIZEOF(ADDRESS)
  85.  
  86.         Ace will support this but for now recalculate those.
  87.  
  88.         Sometimes Convert2Ace don't put in a & instead of a L when it
  89.         convert left shift (11<<4L) to decimal. It just sometimes
  90.         skips the & and I can't find out why. Just keep your eyes open
  91.         for this. It's always the last one in a series of converts.
  92.  
  93.         Check for other stuff as well, Convert2Ace can't handle all
  94.         but most of the C-headers was translated without any problems.
  95.  
  96.         One final word, when Convert2Ace is done it will ask where to
  97.         save the new header, it will open (the first time) in the same
  98.         directory your c-header is. DON'T OVERWRITE YOUR ORIGINAL
  99.         HEADER. Now you are warned.
  100.  
  101.  
  102.         Nils Sjoholm
  103.  
  104.         nils.sjoholm@mailbox.swipnet.se
  105.  
  106.  
  107.